package com.joysuch.wwyt.attendant.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.joysuch.wwyt.attendant.bean.AttendantAreaBean;
import com.joysuch.wwyt.attendant.bean.AttendantAreaReqBean;
import com.joysuch.wwyt.attendant.entity.AttendantArea;
import com.joysuch.wwyt.workflow.bean.CardLineBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xsx
 * @version 1.0
 * @date 2023/2/15 16:52
 */
public interface AttendantAreaMapper extends BaseMapper<AttendantArea> {

    List<AttendantArea> selectByName(@Param("name") String name, @Param("id") Long id);

    Page<AttendantAreaBean> selectAttendantAreaBean(Page<AttendantAreaBean> page, @Param("search") AttendantAreaReqBean search);

    Long selectBeanCount(@Param("search") AttendantAreaReqBean search);

    List<Long> selectIdsByName(@Param("areaName") String areaName);

    String findRailId(@Param("areaId") Long areaId);

    Long selectIdByName(@Param("areaName") String areaName);

    List<CardLineBean> selectAreas(@Param("areaName") String areaName);
}
